<%--
  Created by IntelliJ IDEA.
  User: LD
  Date: 2017/1/9
  Time: 20:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <title>$Title$</title>
    <style type="text/css">
      .tableClass
      {
        border: 1px solid red;
        border-collapse: collapse;
      }
      .tableClass tr td, .tableClass tr th
      {
        border: 1px solid red;
        height: 30px;
        line-height: 30px;
        font-family: 微软雅黑;
        font-size: 14px;
        color: #000000;
        text-align: center;
      }
      .tableClass tr th
      {
        background-color:Purple;
      }
      .oddtrcolor, .oddtrcolor tr td
      {
        background-color:Yellow;
      }
      .eventrcolor, .eventrcolor tr td
      {
        background-color: Lime;
      }
    </style>
  </head>
  <body>
  <div>
    <table cellpadding="0" cellspacing="0" class="tableClass" width="500px">
      <tr>
        <th>
          列一
        </th>
        <th>
          列二
        </th>
        <th>
          列三
        </th>
        <th>
          列四
        </th>
      </tr>
      <%for (int i = 1; i < 11; i++)
      { %>
      <%if (i % 2 == 0)
      {%>
      <tr class="eventrcolor">
          <%}
              else
              { %>
      <tr class="oddtrcolor">
        <%} %>
        <td>
          第[<%=i%>]行第一列
        </td>
        <td>
          第[<%=i%>]行第二列
        </td>
        <td>
          第[<%=i%>]行第三列
        </td>
        <td>
          第[<%=i%>]行第四列
        </td>
      </tr>
      <%} %>
    </table>
  </div>
  </body>
</html>
